package edu.ntu.cloudroid.model.data;
import java.io.PrintWriter;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Random;

import edu.ntu.cloudroid.model.IDs;
import edu.ntu.cloudroid.model.IDs.UploadID;
import edu.ntu.cloudroid.nongui.com.Communicator;

public class TraceInfo implements DetachedData, Serializable{
	private String name;
	private Date timestamp;		
	private double speed;
	private double heartRate;
	private double distance;
	private List<Integer> landmarks;
	
	public TraceInfo(String name, Date ts, List<Integer> landmarks,
			double speed, double distance, double heartRate) {
		this.name = name;
		this.timestamp = ts;
		this.landmarks = landmarks;
		this.speed = speed;
		this.heartRate = heartRate;
		this.distance = distance;
	}

	

	public double getDistance() {
		return distance;
	}



	public void setDistance(double distance) {
		this.distance = distance;
	}



	public String getName() {
		return name;
	}



	public void setName(String name) {
		this.name = name;
	}



	public Date getTimestamp() {
		return timestamp;
	}



	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}



	public double getSpeed() {
		return speed;
	}



	public void setSpeed(double speed) {
		this.speed = speed;
	}



	public double getHeartRate() {
		return heartRate;
	}



	public void setHeartRate(double heartRate) {
		this.heartRate = heartRate;
	}



	public List<Integer> getLandmarks() {
		return landmarks;
	}



	public void setLandmarks(List<Integer> landmarks) {
		this.landmarks = landmarks;
	}



	@Override
	public AbstractData toGAEData() throws Exception {
		return new TraceData(this.name, this.timestamp, this.landmarks,
				this.speed, this.distance, this.heartRate);
	}		

	@Override
	public UploadID getUploadID() {
		return IDs.UploadID.Data;
	}
}
